#include <algorithm>
#include <cstdio>
#define lowbit(x) (x & (-x))

const int N = 2005;
int n, k, fact[N];
double p[N];
long double ans;

inline bool cmp(double a, double b) {
  return std::abs(std::abs(a - 0.5) - std::abs(b - 0.5)) < 1e-7
             ? a < b
             : std::abs(a - 0.5) < std::abs(b - 0.5);
}

inline int count(int i) {
  int res = 0;
  while (i) ++res, i -= lowbit(i);
  return res;
}

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("testdata.in", "r", stdin);
  freopen("testdata.out", "w", stdout);
#endif
#ifndef LOCAL
  freopen("vote.in", "r", stdin);
  freopen("vote.out", "w", stdout);
#endif
#endif

  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; ++i) scanf("%lf", &p[i]);
  std::sort(p, p + n, cmp);
  for (int i = 1; i < 1 << k; ++i) {
    if (count(i) == (k >> 1)) {
      long double tmp = 1;
      for (int j = 0; j < k; ++j) {
        tmp *= (((i >> j) & 1) ? p[j] : (1 - p[j]));
      }
      ans += tmp;
    }
  }
  printf("%Lf", ans);
  return 0;
}